﻿using MyCompany.MyProject.Model.Models.RootKey;
using SqlSugar;


namespace MyCompany.MyProject.Model;

/// <summary>
/// 记录日志的基类
/// </summary>
public class BaseLog:RootEntityTKey<long>
{
    /// <summary>
    /// 分库字段，必填，不然不知道是分库的
    /// </summary>
    [SplitField]
    public DateTime? DateTime { get; set; }

    /// <summary>
    /// 日志级别
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public string? Level { get; set; }

    /// <summary>
    /// 日志消息
    /// </summary>
    [SugarColumn(IsNullable = true,ColumnDataType ="longtext,text,clob")]
    public string? Message { get; set; }

    /// <summary>
    /// 记录日志的模版
    /// </summary>
    [SugarColumn(IsNullable = true, ColumnDataType = "longtext,text,clob")]
    public string? MessageTemplate { get; set; }

    /// <summary>
    /// 日志的属性内容
    /// </summary>
    [SugarColumn(IsNullable = true, ColumnDataType = "longtext,text,clob")]
    public string? Properties { get; set; }
}
